﻿// <reference path="../models/SampleListViewItemModel.ts" />

module TypedMVVM.Samples.Services {
    export class SampleService implements Interfaces.ISampleService {
        getTitle() { return "Welcome to TypedMVVM"; }
        getContent() { return "Sample property from the ViewModel"; }
        getCommandButtonText() { return "Show a PopUp!"; }
        getItemsList(dialogService: Common.Services.IDialogService) {
            return [
                new Models.SampleListViewItemModel(
                    "Sample Item 1",
                    new Common.Commands.RelayCommand(
                        () => dialogService.showDialog("Sample Item1 button clicked"), () => { return true; })),
                new Models.SampleListViewItemModel(
                    "Sample Item 2",
                    new Common.Commands.RelayCommand(
                        () => dialogService.showDialog("Sample Item2 button clicked"), () => { return true; })),
                new Models.SampleListViewItemModel(
                    "Sample Item 2",
                    new Common.Commands.RelayCommand(
                        () => dialogService.showDialog("Sample Item3 button clicked"), () => { return true; }))];
        }
    }
}
